﻿<%@ Page Language="C#" MasterPageFile="~/MuseumOwner.master" AutoEventWireup="true"
    CodeFile="SchoolDetails.aspx.cs" Inherits="SchoolDetails" Title="Schools" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script language="javascript" type="text/javascript">
        function Validate() {
            if (document.getElementById("<%=txtSchoolName.ClientID%>").value == "") {
                alert("School Name can not be blank.");
                document.getElementById("<%=txtSchoolName.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtSchoolAddress.ClientID%>").value == "") {
                alert("School Address can not be blank.");
                document.getElementById("<%=txtSchoolAddress.ClientID%>").focus();
                return false;

            }
            return true;
        }
    </script>
    <style type="text/css">
        .alignment
        {
            vertical-align: middle;
        }
    </style>
    <table width="100%" cellspacing="3" cellpadding="3" border="0">
        <tr>
            <td colspan="3" align="center">
                <b style="font-size: x-large;">School Details</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblSchoolName" Text="School Name" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtSchoolName" runat="server" Width="200px" MaxLength="100"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblSchoolAddress" Text="School Address" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtSchoolAddress" runat="server" Width="200px" MaxLength="100" TextMode="MultiLine"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCountryName" Text="Country" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlCountry" runat="server" Width="200px" DataTextField="CountryName"
                    DataValueField="CountryId" AutoPostBack="true" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">
                </asp:DropDownList>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCity" Text="City" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlCity" runat="server" DataTextField="CityName" DataValueField="CityID"
                    Width="200px">
                </asp:DropDownList>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblMuseumName" Text="Museum" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:ListBox runat="server" DataTextField="MuseumName" 
                    DataValueField="MuseumID" ID="ListBox1" SelectionMode="Multiple" Width="200px" 
                    Height="200px"></asp:ListBox>
                <asp:Button runat="server" ID="btnMoveRight" Text=" >> " OnClick="btnMoveRight_Click" CssClass="alignment"></asp:Button>
                <asp:Button runat="server" ID="btnMoveLeft" Text=" << " OnClick="btnMoveLeft_Click" CssClass="alignment"></asp:Button>
                <asp:ListBox runat="server" DataTextField="MuseumName" DataValueField="MuseumID" ID="ListBox2" SelectionMode="Multiple" Width="200px" Height="200px"></asp:ListBox>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnSubmit" Text="Submit" runat="server" OnClick="btnSubmit_Click"
                    OnClientClick="return Validate();" />&nbsp;&nbsp;
                <asp:Button ID="btnReset" Text="Reset" runat="server" Style="height: 26px; width: 50px;"
                    OnClick="btnReset_Click" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Visible="true"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
